package com.h1.staffmanage.mapper;

import com.h1.staffmanage.entity.TDepartment;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author mengfanyu
 * @since 2022-06-23
 */
@Mapper
public interface TDepartmentMapper extends BaseMapper<TDepartment> {
    /**
     * 获取所有部门
     *
     * @return
     */
    List<TDepartment> getAllDepartments(Integer parentId);

    /**
     * 添加部门
     *
     * @param dep
     */
    void addDep(TDepartment dep);

    /**
     * 删除部门
     *
     * @param dep
     */
    void deleteDep(TDepartment dep);
}
